/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ideastec.mipyme.model.fax;

import com.ideastec.mipyme.model.EntidadPersistible;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

/**
 *
 * @author Diego Rafael Graf
 */

public class Fax extends EntidadPersistible{
    
     private String fax;
     
     public Fax(){
     
     }
     
     public Fax(String fax){
         this.fax = fax;
     }
     
     public String getFax(){
        return this.fax;
     }
    
     public void setFax(String fax){
        this.fax = fax;
     }
     
     @Override
     public String toString(){
        return this.fax;
     }
     
     @Override
     public boolean equals(Object objeto){
         if(objeto == null || !objeto.getClass().isAssignableFrom(Fax.class)){
             return false;
         }else{
             Fax fax2 = (Fax) objeto;
             return new EqualsBuilder().append(fax2.toString(), this.toString()).isEquals();
         }
     }
    
    @Override
    public int hashCode(){
        return new HashCodeBuilder().append(this.toString()).append(this.toString()).toHashCode();
    }
    
}
